Optimal. Leaf size=92 \[ -\frac {b}{8 c d^3 (i-c x)^2}+\frac {i b}{8 c d^3 (i-c x)}-\frac {i b \text {ArcTan}(c x)}{8 c d^3}+\frac {i (a+b \text {ArcTan}(c x))}{2 c d^3 (1+i c x)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4972, 641, 46,
209} \begin {gather*} \frac {i (a+b \text {ArcTan}(c x))}{2 c d^3 (1+i c x)^2}-\frac {i b \text {ArcTan}(c x)}{8 c d^3}+\frac {i b}{8 c d^3 (-c x+i)}-\frac {b}{8 c d^3 (-c x+i)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 209
Rule 641
Rule 4972
Rubi steps
\begin {align*} \int \frac {a+b \tan ^{-1}(c x)}{(d+i c d x)^3} \, dx &=\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 c d^3 (1+i c x)^2}-\frac {(i b) \int \frac {1}{(d+i c d x)^2 \left (1+c^2 x^2\right )} \, dx}{2 d}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 c d^3 (1+i c x)^2}-\frac {(i b) \int \frac {1}{\left (\frac {1}{d}-\frac {i c x}{d}\right ) (d+i c d x)^3} \, dx}{2 d}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 c d^3 (1+i c x)^2}-\frac {(i b) \int \left (\frac {i}{2 d^2 (-i+c x)^3}-\frac {1}{4 d^2 (-i+c x)^2}+\frac {1}{4 d^2 \left (1+c^2 x^2\right )}\right ) \, dx}{2 d}\\ &=-\frac {b}{8 c d^3 (i-c x)^2}+\frac {i b}{8 c d^3 (i-c x)}+\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 c d^3 (1+i c x)^2}-\frac {(i b) \int \frac {1}{1+c^2 x^2} \, dx}{8 d^3}\\ &=-\frac {b}{8 c d^3 (i-c x)^2}+\frac {i b}{8 c d^3 (i-c x)}-\frac {i b \tan ^{-1}(c x)}{8 c d^3}+\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 c d^3 (1+i c x)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 55, normalized size = 0.60 \begin {gather*} -\frac {i \left (4 a+b (-2 i+c x)+b \left (3-2 i c x+c^2 x^2\right ) \text {ArcTan}(c x)\right )}{8 c d^3 (-i+c x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 82, normalized size = 0.89
method | result | size |
derivativedivides | \(\frac {\frac {i a}{2 d^{3} \left (i c x +1\right )^{2}}+\frac {i b \arctan \left (c x \right )}{2 d^{3} \left (i c x +1\right )^{2}}-\frac {i b \arctan \left (c x \right )}{8 d^{3}}-\frac {b}{8 d^{3} \left (c x -i\right )^{2}}-\frac {i b}{8 d^{3} \left (c x -i\right )}}{c}\) | \(82\) |
default | \(\frac {\frac {i a}{2 d^{3} \left (i c x +1\right )^{2}}+\frac {i b \arctan \left (c x \right )}{2 d^{3} \left (i c x +1\right )^{2}}-\frac {i b \arctan \left (c x \right )}{8 d^{3}}-\frac {b}{8 d^{3} \left (c x -i\right )^{2}}-\frac {i b}{8 d^{3} \left (c x -i\right )}}{c}\) | \(82\) |
risch | \(-\frac {b \ln \left (i c x +1\right )}{4 c \,d^{3} \left (c x -i\right )^{2}}+\frac {4 b \ln \left (-i c x +1\right )-\ln \left (-c x +i\right ) b \,c^{2} x^{2}+\ln \left (c x +i\right ) b \,c^{2} x^{2}+2 i \ln \left (-c x +i\right ) b c x -2 i \ln \left (c x +i\right ) b c x +b \ln \left (-c x +i\right )-b \ln \left (c x +i\right )-2 i b c x -8 i a -4 b}{16 d^{3} \left (c x -i\right )^{2} c}\) | \(147\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 65, normalized size = 0.71 \begin {gather*} -\frac {i \, b c x + {\left (i \, b c^{2} x^{2} + 2 \, b c x + 3 i \, b\right )} \arctan \left (c x\right ) + 4 i \, a + 2 \, b}{8 \, {\left (c^{3} d^{3} x^{2} - 2 i \, c^{2} d^{3} x - c d^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.25, size = 75, normalized size = 0.82 \begin {gather*} \frac {-2 i \, b c x + {\left (b c^{2} x^{2} - 2 i \, b c x + 3 \, b\right )} \log \left (-\frac {c x + i}{c x - i}\right ) - 8 i \, a - 4 \, b}{16 \, {\left (c^{3} d^{3} x^{2} - 2 i \, c^{2} d^{3} x - c d^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 158 vs. \(2 (70) = 140\).
time = 1.82, size = 158, normalized size = 1.72 \begin {gather*} \frac {b \log {\left (- i c x + 1 \right )}}{4 c^{3} d^{3} x^{2} - 8 i c^{2} d^{3} x - 4 c d^{3}} - \frac {b \log {\left (i c x + 1 \right )}}{4 c^{3} d^{3} x^{2} - 8 i c^{2} d^{3} x - 4 c d^{3}} + \frac {b \left (- \frac {\log {\left (b x - \frac {i b}{c} \right )}}{16} + \frac {\log {\left (b x + \frac {i b}{c} \right )}}{16}\right )}{c d^{3}} + \frac {- 4 i a - i b c x - 2 b}{8 c^{3} d^{3} x^{2} - 16 i c^{2} d^{3} x - 8 c d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {a+b\,\mathrm {atan}\left (c\,x\right )}{{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________